﻿<%@ Page Language="C#" MasterPageFile="~/MainMaster.Master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="Mang24k99.Web.Dissertation.Reference.List" Title="24k99后台管理系统-修改参考文件" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table border="0" cellpadding="0" cellspacing="0" width="100%" height="34" align="center" background="../../Images/bg1.jpg">
        <tr>
            <td class="nav" style="width:50%;text-align:left">您当前的位置:
                <asp:Label ID="SpecialWeb" runat="server">FX168网站</asp:Label>专题顺序设置
            </td>
            <td class="nav" style="width:50%;text-align:right">您的身份:<asp:Label ID="identity" runat="server">系统管理员</asp:Label></td>
        </tr>
    </table>
    <table border="0" cellpadding="0" cellspacing="0" width="95%" align="center" style="border-collapse: collapse">
        <tr style="padding-top:10px;padding-bottom:10px;">
            <td class="nav" style="width:30%;text-align:left">
                网站选择:
                <asp:DropDownList ID="selectWeb" runat="server" AutoPostBack="true" onselectedindexchanged="selectWeb_SelectedIndexChanged">
                    <asp:ListItem Value="1" Selected="True">FX168网站</asp:ListItem>
                    <asp:ListItem Value="2">24K99网站</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                &nbsp;&nbsp;&nbsp;&nbsp;<asp:LinkButton Font-Underline="true" ForeColor="#0067BF" ID="dissList" runat="server" Text="专题列表" onclick="dissList_Click" />
                &nbsp;&nbsp;&nbsp;&nbsp;<asp:LinkButton Font-Underline="true" ForeColor="#0067BF" ID="addDisFile" runat="server" Text="添加专题文件" onclick="addDisFile_Click" />
            </td>
        </tr>
    </table>
    <asp:Repeater ID="dissertationName" runat="server" 
        onitemdatabound="dissertationName_ItemDataBound">
        <HeaderTemplate>
            <table border="1" cellpadding="0" id="dissertationNameTable" cellspacing="0" width="95%" align="center" bordercolor="#BED6A6" style="border-collapse: collapse">
                <tr><th class="tb_title2">序号</th><th class="tb_title2">专题名称</th><th class="tb_title2">参考文件</th><th colspan="2" class="tb_title2">操作</th></tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td><%#(NewsPager.CurrentPageIndex-1) * NewsPager.PageSize +Container.ItemIndex+1 %></td>
                <td><%#Eval("Name").ToString().Length > 10 ? Eval("Name").ToString().Substring(0, 10)+"..." : Eval("Name").ToString()%></td>
                <td>
                    <asp:Label ID="showInfo" Visible="false" runat="server"></asp:Label>
                    <asp:Repeater ID="referenceTitle" runat="server" onitemcommand="referenceTitle_ItemCommand" onitemdatabound="referenceTitle_ItemDataBound">
                        <HeaderTemplate>
                            <table border="0" cellpadding="0" cellspacing="0" width="100%" align="center" style="border-collapse: collapse">
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                                <td>
                                    <a target="_blank" href='<%# "../../"+Eval("FilePath").ToString()%>''><%# Container.ItemIndex + 1%>.<%# Eval("FileTitle").ToString().Length > 10 ? Eval("FileTitle").ToString().Substring(0, 10) + "..." : Eval("FileTitle").ToString()%></a>
                                </td>
                                <td><asp:LinkButton ID="deleteFile" CommandName="DisFile" CommandArgument='<%#Eval("RecordID") %>' runat="server">删除</asp:LinkButton></td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                </td>
                <td style="text-align:center;">
                    <asp:HyperLink NavigateUrl='<%#"~/Dissertation/Reference/Edit.aspx?ID="+Eval("ID")+"&WEBID="+selectWeb.SelectedValue+"&PageIndex="+NewsPager.CurrentPageIndex %>' ID="updateReference" runat="server">修改</asp:HyperLink>
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>
        <script type="text/javascript">
            addTrHover("dissertationNameTable");
        </script>
    <br />
    <div style="width:95%;margin-left:20px;">
    <webdiyer:AspNetPager ID="NewsPager" AlwaysShow="true" runat="server" Height="22px" OnPageChanged="NewsPager_PageChanged"
        PageSize="2" FirstPageText="首页" ShowInputBox="Always" LastPageText="末页" NextPageText="下一页" PrevPageText="上一页">
    </webdiyer:AspNetPager></div>
</asp:Content>
